<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
</head>
<style>
    body{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    table.gridtable {    font-family: verdana,arial,sans-serif;    font-size:11px;    color:#333333;    border-width: 1px;    border-color: #666666;    border-collapse: collapse;
    }table.gridtable th {    border-width: 1px;    padding: 8px;    border-style: solid;    border-color: #666666;    background-color: #dedede;
     }table.gridtable td {    border-width: 1px;    padding: 8px;    border-style: solid;    border-color: #666666;    background-color: #ffffff;
      }
</style>
<body>
<div>

    <div>
        <?php for($p = 1; $p <= $pageNum; $p++): ?>
            <?php if($page == $p): ?>
                <span><?= $p ?></span>
            <?php else: ?>
                <a href="/index/index?page=<?= $p ?>"> <?= $p ?> </a>
            <?php endif; ?>
        <?php endfor; ?>
    </div>

    <table class="gridtable">
        <thead>
        <tr>
            <th>id</th>
            <th>作者</th>
            <th>sql</th>
            <th>备注</th>
            <th>操作时间</th>
        </tr>
        </thead>
        <tbody>

        <?php foreach($list as $row): ?>

            <tr>
                <th><?= $row['id'] ?></th>
                <th><?= $row['author'] ?></th>
                <th><?= $row['content'] ?></th>
                <th><?= $row['note'] ?></th>
                <th><?= $row['create_time'] ?></th>
            </tr>

        <?php endforeach; ?>

        </tbody>
    </table>

    <div>
        <form action="/index/add" method="post">
            <div>
                <span>作者</span>
                <input type="text" name="author">
            </div>
            <div>
                <span>说明</span>
                <input type="text" name="note">
            </div>
            <div>
                <span>sql</span>
                <textarea name="content" cols="50" rows="10"></textarea>
            </div>

            <div>
                <input type="submit" value="提交">
            </div>
        </form>
    </div>

</div>
<div>

</div>
</body>
</html>